/*
 * EquipmentType.h
 *
 *  Created on: Oct 8, 2011
 *  Created by: Devin Manno
 *  Updated by: Devin Manno, Nick James
 *	Last Update: Oct 13, 2011
 */

#ifndef EQUIPMENTTYPE_H_
#define EQUIPMENTTYPE_H_

#include "Stats.h"
#include "Base.h"
#include <ctime>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <string.h>

#define DELIMS ",\n"
#define MAX 250

using std::string;
using std::ostream;
using std::istream;
using std::endl;

enum itemSlot { HEAD, CHEST, GLOVES, FEET, PANTS, WEAPON };

class EquipmentType: public Base {
private:
	itemSlot itemType;			// based on itemSlot, above
	Stats itemStats;			// the item's stats
	void generate(int, int);		// sets stats for ItemStats
    
    friend std::ostream& operator<<(std::ostream& out, EquipmentType& e);
    
    friend std::istream& operator>>(std::istream&, EquipmentType&);

public:
	static const int maxSlots = 6;		// maximum number of equipment items a character can wear/use at once
	static const int maxBoost = 10;		// maximum value for any individual stat in an equipment
    
	EquipmentType(); // randomly create an EquipmentType object
	EquipmentType(itemSlot); // create a specific EquipmentType object
    
	virtual ~EquipmentType();
	
	// getters
	int getItemType() const; // returns the type of the equipment based on itemSlot
	const Stats &getItemStats() const;
	void generateHelmet();		// generates a helmet
	void generateChest();		// generates chest armor 
	void generateGloves();		// generates gloves 
	void generateBoots();		// generates boots 
	void generatePants();		// generates pants 
	void generateWeapon();		// generates a weapon
	
	/*
     // virtual function implementations
     std::string getClassName()const;
     */
};

#endif /* EQUIPMENTTYPE_H_ */
